package db

import (
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

// import "database/sql"


var DB *gorm.DB

func init()  {
	var err error
	dsn := "test:test@tcp(localhost:3306)/test?charset=utf8mb4"
	DB, err = gorm.Open(mysql.Open(dsn), &gorm.Config{})
	if err != nil {
		panic("db connection failed")
	}
}